package com.zzyl.controller;

import com.github.pagehelper.Page;
import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.dto.DeviceServiceDataPageQueryDto;
import com.zzyl.service.DeviceDataService;
import com.zzyl.service.DeviceService;
import com.zzyl.vo.DeviceDataVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.zzyl.base.ResponseResult.success;

/**
 * @Description DeviceDataController
 * @Author Bafeii7
 * @Date 2025-05-22 16:58
 */
@RestController
public class DeviceDataController {

    @Autowired
    private DeviceDataService deviceDataService;


    @GetMapping("/device-data/get-page")
    public ResponseResult<PageResponse<List<DeviceDataVo>>> pageQueryDeviceData(DeviceServiceDataPageQueryDto pageQueryDto){
        PageResponse<DeviceDataVo> pageResponse = deviceDataService.pageQueryDeviceData(pageQueryDto);
        return success(pageResponse);
    }

}
